From ad643e3ef0104d2b986b7ce37fb8980bcb98d393 Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Wed, 31 Jan 2007 15:06:40 +0000 Subject: [PATCH] [XENAPI] Remove some deprecated fields from the Xen API test script. Signed-off-by: Alastair Tse --- tools/python/scripts/test_hvm_create.py | 9 ++------- tools/python/scripts/test_vm_create.py | 11 +++-------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/tools/python/scripts/test_hvm_create.py b/tools/python/scripts/test_hvm_create.py index 8effd42db9..7cae70539a 100644 --- a/tools/python/scripts/test_hvm_create.py +++ b/tools/python/scripts/test_hvm_create.py @@ -13,16 +13,11 @@ vm_cfg = { 'VCPUs_policy': 'credit', - 'VCPUs_params': '', + 'VCPUs_params': {}, 'VCPUs_number': 2, - 'VCPUs_features_required': '', - 'VCPUs_features_can_use': '', - 'VCPUs_features_force_on': '', - 'VCPUs_features_force_off': '', 'actions_after_shutdown': 'destroy', 'actions_after_reboot': 'restart', - 'actions_after_suspend': 'destroy', 'actions_after_crash': 'destroy', 'PV_bootloader': '', @@ -44,7 +39,7 @@ vm_cfg = { local_vdi_cfg = { 'name_label': 'gentoo.hvm', 'name_description': '', - 'uri': 'file:/root/gentoo.amd64.hvm.img', + 'location': 'file:/root/gentoo.amd64.hvm.img', 'virtual_size': 0, 'sector_size': 0, 'type': 'system', diff --git a/tools/python/scripts/test_vm_create.py b/tools/python/scripts/test_vm_create.py index 0d702aae69..84959c3e0d 100644 --- a/tools/python/scripts/test_vm_create.py +++ b/tools/python/scripts/test_vm_create.py @@ -15,14 +15,9 @@ vm_cfg = { 'VCPUs_policy': 'credit', 'VCPUs_params': '', 'VCPUs_number': 2, - 'VCPUs_features_required': '', - 'VCPUs_features_can_use': '', - 'VCPUs_features_force_on': '', - 'VCPUs_features_force_off': '', 'actions_after_shutdown': 'destroy', 'actions_after_reboot': 'restart', - 'actions_after_suspend': 'destroy', 'actions_after_crash': 'destroy', 'PV_bootloader': '', @@ -65,7 +60,7 @@ vbd_cfg = { local_vdi_cfg = { 'name_label': 'gentoo.amd64.img', 'name_description': '', - 'uri': 'file:/root/gentoo.amd64.img', + 'location': 'file:/root/gentoo.amd64.img', 'virtual_size': 0, 'sector_size': 0, 'type': 'system', @@ -183,13 +178,13 @@ def test_vm_create(): execute(server, 'VM.resume', (session, vm_uuid, False)) print 'Resumed VM.' + finally: # Wait for user to say we're good to shut it down while True: destroy = raw_input('destroy VM? ') if destroy[0] in ('y', 'Y'): break - - finally: + # Clean up if vif_uuid: execute(server, 'VIF.destroy', (session, vif_uuid)) -- 2.30.2